

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class DnpClassicHeader extends StatelessWidget {
  const DnpClassicHeader({super.key});

  @override
  Widget build(BuildContext context) {
    return ClassicHeader(
      refreshStyle: RefreshStyle.Follow,
      textStyle: TextStyle(color: Colors.white), // 修改文字颜色
      completeText: "Refresh completed",
      idleText: "Pull down to refresh",
      refreshingText: "Loading...",
      failedIcon: const Icon(Icons.error, color: Colors.white),
      completeIcon:const Icon(Icons.done, color: Colors.white),
      idleIcon:const Icon(Icons.arrow_downward, color: Colors.white),
      releaseIcon:const Icon(Icons.refresh, color: Colors.white),
      refreshingIcon: SizedBox(
        width: 25.0,
        height: 25.0,
        child: CupertinoActivityIndicator(
            color: Colors.white
        ),
      ),
    );
  }
}
